package iosr11.data;

import java.util.ArrayList;
import java.util.List;

public class EventSeries extends Entity{
	
	private EventKind kind;
	private Teacher teacher;
	private List<Event> events;
	
	public EventSeries(){
		
	}
	
	public EventSeries(String id, EventKind kind, Teacher teacher, List<Event> events){
		super(id);
		this.kind=kind;
		this.teacher=teacher;
		this.events=events;
	}

	public EventKind getKind() {
		return kind;
	}

	public void setKind(EventKind kind) {
		this.kind = kind;
	}

	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	public List<Event> getEvents() {
		return events;
	}

	public void setEvents(List<Event> events) {
		this.events = events;
	}
	
	public int changeEventKindToInt(EventKind kind){
		return EventKind.returnInt(kind);
	}
	
	public EventKind changeIntToEventKind(int kind){
		return EventKind.returnEventKind(kind);
	}
	
	public void setKind(int kind){
		this.setKind(this.changeIntToEventKind(kind));
	}
	
	public void addEvent(Event event){
		if (this.events==null)
			this.events=new ArrayList<Event>();
		this.events.add(event);
	}
	
	public void removeEvent(Event event){
		if (this.events!=null){
			this.events.remove(event);
		}
	}
}
